package com.jarviszeng.springcloud.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @Value("${myapp.name}")
    private String appName;

    @GetMapping("/hello")
    public String hello(){
        return "Hello, World!";
    }

    @GetMapping("info")
    public String info(){
        return this.appName;
    }
}
